
<template>
  <div>聊天内容初始化中...</div>
</template>

<script>


export default{

  mounted() {
    this.onLogin()
  },

  methods: {
    onLogin: function () {
      // TODO 登录
      let username = '保密';
      let password = '保密';

      var options = {
        user: username,
        pwd: password,
        appKey: WebIM.config.appkey,
        apiUrl: 'https://a1.easecdn.com'
      };
      WebIM.conn.open(options);
      localStorage.setItem("userInfo", JSON.stringify({ userId: username, password: password }));
    },
  }


};
</script>
<style scoped>
  div{
    margin: 100px auto;
    text-align: center;
  }
</style>
